//
//  RTLocationManager.h
//  AiFang
//
//  Created by zheng yan on 12-4-24.
//  Copyright (c) 2012年 anjuke. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

#define WSLocatedCityNameChangedNotification        @"LocatedCityNameChangedNotification"
#define WSSelectedCityNameChangedNotification       @"WSSelectedCityNameChangedNotification"

typedef enum {
    
    RTCLServiceStatusFirst,//定位第一次打开 ios4.2以上
    RTCLServiceStatusOK,//定位服务开启
    RTCLServiceStatusDenied, //用户拒绝服务
    RTCLServiceStatusNoNetwork,//用户网络未开
    RTCLServiceStatusUnknowError //其他错误
    
} WSCLServiceStatus;//定位服务状态

@interface WSLocationManager : NSObject <CLLocationManagerDelegate>

+ (instancetype)sharedInstance;
- (instancetype)init;

@property (nonatomic, readonly) CLLocationManager *locationManager;
@property (nonatomic, readonly) NSString *locatedCityName;
@property (nonatomic, strong)   CLLocation *userLocation;
@property (nonatomic, strong)   NSString *selectedCityName;

- (void)startLocation;
- (void)stopLocation;
- (void)restartLocation;
- (BOOL)locationServicesEnabled;

//new
- (WSCLServiceStatus)locationServicesStatus;
- (void)fetchCityInfoWithLocation:(CLLocation *)location;

@end
